﻿namespace Cuce.ReportingServices
{
    using System;
    using SSRSWS;

    /// <summary>
    /// This class represents a Report Exception
    /// </summary>
    [Serializable]
    public class ReportException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ReportException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="warning">The warning.</param>
        public ReportException(string message, Warning[] warning)
            : base(message)
        {
            this.Warnings = warning;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ReportException"/> class.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="innerException">The inner exception.</param>
        public ReportException(string message, Exception innerException) 
            : base(message, innerException)
        {
        }

        /// <summary>
        /// Gets or sets warnings from a Render
        /// </summary>
        public Warning[] Warnings { get; set; }
    }
}
